<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>登录</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script type="text/javascript" src="scripts/jquery-1.9.1.min.js" language="javascript"></script>
	<script type="text/javascript" src="scripts/Validform_v5.3.2_min.js"></script>
	<link rel="stylesheet" type="text/css" href="style/Validform_v5.3.2_css.css">
	<link href="ylzui/style/common.css" rel="stylesheet" type="text/css" />
    <link href="ylzui/style/login.css" rel="stylesheet" type="text/css" />
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  
  </head>
   <script type="text/javascript">
$(function(){
	$("#codeImage").click(function() {
		this.src = "system/codeImage.shtml?timestamp=" + new Date().getTime();
	});
	$("#securityCode").change(function() {
		console.info(document.getElementById("securityCode").value);
		this.ajaxurl="system/checkCodeImage.shtml?securityCode="+document.getElementById("securityCode").value;
	});
	$(".ylzform").Validform({
		tiptype:function(msg,o,cssctl){
			//msg：提示信息;
			//o:{obj:*,type:*,curform:*}, obj指向的是当前验证的表单元素（或表单对象），type指示提示的状态，值为1、2、3、4， 1：正在检测/提交数据，2：通过验证，3：验证失败，4：提示ignore状态, curform为当前form对象;
			//cssctl:内置的提示信息样式控制函数，该函数需传入两个参数：显示提示信息的对象 和 当前提示的状态（既形参o中的type）;
			if(!o.obj.is("form")){//验证表单元素时o.obj为该表单元素，全部验证通过提交表单时o.obj为该表单对象;
				var objtip=o.obj.siblings(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}
		}
	});
})
</script>
  <body>
  
  <div class="login_frame">
<!--login_frame_begin-->
    <form class="ylzform"  method="post" action="system/login.shtml">
	<div class="login_box">
	<table border="0" cellspacing="0" cellpadding="0" class="t_tips">
			<tr>
				<td>
				    <c:if test="${status==null}">
					<font class="font_sty4" style="display:block;">请输入您的账号和密码进行登录</font>
					</c:if>
					<c:if test="${status=='y'}">
					<font class="font_red" >您输入您的账号和密码有误，请尽快联系管理员协助修改</font>
					</c:if>
					<c:if test="${status=='j'}">
					<font class="font_red" >您的账号还未激活，请去你的邮箱激活!</font>
					</c:if>
					<c:if test="${status=='l'}">
					<font class="font_red" >您的账号被锁,请联系管理员!</font>
					</c:if>
				</td>
			</tr>
		</table>
		<h3>用户名</h3>
		<span class="input_area">
		<input type="text" name="user.zhm000"  value=""
		nullmsg="请输入用户名!" datatype="s3-18" errormsg="用户名至少3个字符,最多18个字符!"/>
		<div class="Validform_checktip"></div>
		</span>
		<h3>密码</h3>
		<span class="input_area">
		<input type="password" value=""   name="user.zhmm00" 
		datatype="*6-16" nullmsg="请输入密码！" errormsg="密码范围在6~16位之间！"/>
		<div class="Validform_checktip"></div>
		</span>
		<div class="operate_btn"><input type="submit" value="" /></div>
		<c:if test="${status=='y'}">
		<h3>验证码</h3>
		<span class="input_area">
		<input id="securityCode" class="check_code" type="text" name="securityCode" onchange=""
								 datatype="s4-4" ajaxurl="system/checkCodeImage.shtml?securityCode=" nullmsg="请输入验证码!" errormsg="验证码错误"/>
								<span class="check_code_img mlr10"><img src="system/codeImage.shtml" id="codeImage" alt="点击图片刷新验证码"/></span>
								<span>点击图片刷新验证码</span>
								<div class="Validform_checktip"></div>
		</span>
		</c:if>
	<!--login_box_end-->
	</div>
	</form>
<!--login_frame_end-->
</div>
  </body>
</html>
